package com.ruoyi.web.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.mapper.GuMrTradeDetailMapper;
import com.ruoyi.web.domain.GuMrTradeDetail;
import com.ruoyi.web.service.IGuMrTradeDetailService;

/**
 * 个股逐笔成交明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-24
 */
@Service
public class GuMrTradeDetailServiceImpl implements IGuMrTradeDetailService 
{
    @Autowired
    private GuMrTradeDetailMapper guMrTradeDetailMapper;

    /**
     * 查询个股逐笔成交明细
     * 
     * @param id 个股逐笔成交明细主键
     * @return 个股逐笔成交明细
     */
    @Override
    public GuMrTradeDetail selectGuMrTradeDetailById(String id)
    {
        return guMrTradeDetailMapper.selectGuMrTradeDetailById(id);
    }

    /**
     * 查询个股逐笔成交明细列表
     * 
     * @param guMrTradeDetail 个股逐笔成交明细
     * @return 个股逐笔成交明细
     */
    @Override
    public List<GuMrTradeDetail> selectGuMrTradeDetailList(GuMrTradeDetail guMrTradeDetail)
    {
        return guMrTradeDetailMapper.selectGuMrTradeDetailList(guMrTradeDetail);
    }

    /**
     * 新增个股逐笔成交明细
     * 
     * @param guMrTradeDetail 个股逐笔成交明细
     * @return 结果
     */
    @Override
    public int insertGuMrTradeDetail(GuMrTradeDetail guMrTradeDetail)
    {
        guMrTradeDetail.setCreateTime(DateUtils.getNowDate());
        return guMrTradeDetailMapper.insertGuMrTradeDetail(guMrTradeDetail);
    }

    /**
     * 修改个股逐笔成交明细
     * 
     * @param guMrTradeDetail 个股逐笔成交明细
     * @return 结果
     */
    @Override
    public int updateGuMrTradeDetail(GuMrTradeDetail guMrTradeDetail)
    {
        guMrTradeDetail.setUpdateTime(DateUtils.getNowDate());
        return guMrTradeDetailMapper.updateGuMrTradeDetail(guMrTradeDetail);
    }

    /**
     * 批量删除个股逐笔成交明细
     * 
     * @param ids 需要删除的个股逐笔成交明细主键
     * @return 结果
     */
    @Override
    public int deleteGuMrTradeDetailByIds(String[] ids)
    {
        return guMrTradeDetailMapper.deleteGuMrTradeDetailByIds(ids);
    }

    /**
     * 删除个股逐笔成交明细信息
     * 
     * @param id 个股逐笔成交明细主键
     * @return 结果
     */
    @Override
    public int deleteGuMrTradeDetailById(String id)
    {
        return guMrTradeDetailMapper.deleteGuMrTradeDetailById(id);
    }
}
